# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest do
  @moduledoc """
  The request message for the ImportProcessorVersion method. The Document AI [Service Agent](https://cloud.google.com/iam/docs/service-agents) of the destination project must have [Document AI Editor role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on the source project. The destination project is specified as part of the parent field. The source project is specified as part of the source or external_processor_version_source field.

  ## Attributes

  *   `externalProcessorVersionSource` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource.t`, *default:* `nil`) - The source processor version to import from. It can be from a different environment and region than the destination processor.
  *   `processorVersionSource` (*type:* `String.t`, *default:* `nil`) - The source processor version to import from. The source processor version and destination processor need to be in the same environment and region. Note that ProcessorVersions with `model_type` `MODEL_TYPE_LLM` are not supported.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :externalProcessorVersionSource =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource.t()
            | nil,
          :processorVersionSource => String.t() | nil
        }

  field(:externalProcessorVersionSource,
    as:
      GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource
  )

  field(:processorVersionSource)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest do
  def decode(value, options) do
    GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
